This is an example of distributing messages over WSS (WebSocket Secure) based on WebSockets. Below is an example of manual compilation and installation, excluding the installation of the WebSockets library.

git clone https://gitee.com/lamei/msg-router.git

cd msg-router

# compile the program
gcc -o msg-router src/msg-router.c -lwebsockets

# create user
useradd -s /sbin/nologin msg-router

# make directory for log storage
mkdir -p /opt/msg-router/log

# change the ownner of the log directory to msg-router
chown msg-router:msg-router /opt/msg-router/log

# make directory for ssl cert and key
mkdir -p /opt/msg-router/ssl

# copy the configure file
cp msg-router.conf /opt/msg-router/

# copy the program file
cp msg-router /opt/msg-router/

# 
chmod +x /opt/msg-router/msg-router

# copy the systemd daemon file
cp msg-router.service /lib/systemd/system/msg-router.service

# reload
systemctl daemon-reload
